<?php
include __DIR__."/Solution.php";

/**
 * Created by PhpStorm.
 * User: Sage
 * Date: 2019/4/11
 * Time: 11:06
 */
class SolutionTest extends  \PHPUnit\Framework\TestCase {


    /**
     * @param mixed ...$params
     * @dataProvider dataProvider
     */
    function testSolution(...$params){
        $answer=array_pop($params);
        $this->assertEquals($answer,(new Solution)->test(...$params));
    }

    function dataProvider(){
        return [
            [
                ["LRUCache","get","put","get","put","put","get","get"],
                [[2],[2],[2,6],[1],[1,5],[1,2],[1],[2]],
                [null,-1,null,-1,null,null,2,6]
            ],
            [
                ["LRUCache","put","put","get","put","get","put","get","get","get"],
                [[2],[1,1],[2,2],[1],[3,3],[2],[4,4],[1],[3],[4]],
                [null,null,null,1,null,-1,null,-1,3,4]
            ]
        ];
    }
}



